package com.yl.chainStore.entity.pay

import com.baomidou.mybatisplus.annotation.IdType
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import com.yl.chainStore.common.enums.TypeEnum
import com.yl.common.annotation.NoArg
import com.yl.common.getContext
import java.util.*

/**
 * <p>
 *  馈赠金变动记录
 * </p>
 *
 * @author cxw
 * @since 2022-02-21
 */
@NoArg
@TableName("pay_customer_gifts_of_gold")
    data class PayCustomerGiftsOfGold  (

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    var id: Long = 0,

    /**
     * 关联id
     */
    @TableField("associate_id")
    var associateId: Long? = null,

    /**
     * 金额
     */
    @TableField("money")
    var money: Long,

    /**
     * 变动后余额
     */
    @TableField("after_money")
    var afterMoney: Long,

    /**
     * 客户id
     */
    @TableField("customer_id")
    var customerId: Long,

    /**
     * 变动类型
     */
    @TableField("update_type")
    var updateType: TypeEnum,

    /**
     * 创建时间
     */
    @TableField("create_time")
    var createTime: Date = Date(),

    /**
     * 操作人
     */
    @TableField("create_user_id")
    var createUserId: Long = getContext().userId,

    /**
     * 备注
     */
    @TableField("remark")
    var remark: String? = null,

    /**
     * 公司id
     */
    @TableField("company_id")
    var companyId:Long = getContext().companyId,

    /**
     * 分院id
     */
    @TableField("sub_company_id")
    var subCompanyId:Long = getContext().subCompanyId

    )
